<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<style type="text/css">
		tr.hot td{font-size:20px;font-weight: bold;}
		tr.red td{color:#f00;}
		tr.bgred td{background: #f00;color:yellow;}
		li.bgGreen{background: green;color:#000;}
	</style>
</head>
<body>
	{hd:include file="header.html"}
	<hr/>
	<table border="1" width="600">
		<tr>
			<td>学生名</td>
			<td>性别</td>
			<td>出生日期</td>
		</tr>
		{hd:section loop="$data" name="n"}
		{hd:if $smarty.section.n.first}
			<tr class="hot">
				<td>{hd:$data[n].sname}</td>
				<td>{hd:$data[n].sex}</td>
				<td>{hd:$data[n].birthday}</td>
			</tr>
		{hd:elseif $smarty.section.n.index<=2}
			<tr class="red">
				<td>{hd:$data[n].sname}</td>
				<td>{hd:$data[n].sex}</td>
				<td>{hd:$data[n].birthday}</td>
			</tr>
		{hd:elseif $smarty.section.n.last}
		<tr class="bgred">
				<td>{hd:$data[n].sname}</td>
				<td>{hd:$data[n].sex}</td>
				<td>{hd:$data[n].birthday}</td>
			</tr>
		{hd:else}
			<tr>
			<td>{hd:$data[n].sname}</td>
			<td>{hd:$data[n].sex}</td>
			<td>{hd:$data[n].birthday}</td>
		</tr>
		{hd:/if}
		{hd:/section}
	</table>
	<hr/>
	{hd:section loop="$data" name="n1"}
	{hd:if  $smarty.section.n1.index%2==0}
		<li class="bgGreen">{hd:$data[n1].sname}({hd:$data[n1].birthday})</li>
	{hd:else}
		<li>{hd:$data[n1].sname}({hd:$data[n1].birthday})</li>
	{hd:/if}
	{hd:/section}
</body>
</html>